Repository navigation
Nomad queue system - #13
Merged
Merged
Conversation
added 5 commits
November 11, 2026 18:40
New extra version "nomad", in the style of condor: Batch2Tests, plus NotInstalled, BadQueue and PollSlaveCrash under ErrorHandling. Recorded against a local Nomad dev agent (2.1.1, Windows). Nomad is driven via HTTP, but CaptureMock's HTTP mode can't be combined with the classic server needed for the master/slave traffic. So the tests intercept TextTest's nomadapi module (and secrets.token_hex, used in job IDs) as Python traffic. Recorded API responses are cut down to the fields the module reads. Nomad slaves only get the environment the master sends, so the nomad personal config forwards STANDARD_PERSONAL, plus CAPTUREMOCK_SERVER and TEXTTEST_PICKLE_PROTOCOL which the slaves need while recording. PollSlaveCrash deliberately leaves out STANDARD_PERSONAL so that the slave really crashes.
- Re-record Batch2Tests and PollSlaveCrash for the new job IDs, which now include a submission counter, and the explicit Datacenters. - Make the Windows recordings comparable on Linux and macOS: turn the doubled backslashes in recorded job specifications into slashes. - Ignore the attribute lookups Python's import machinery makes when CaptureMock intercepts the module, which may vary between versions. - Remove personal data from the recordings: local paths, and the slave's stderr in PollSlaveCrash and the Windows-specific connection error in NotInstalled, both replaced with neutral text.
Set HOME and USERPROFILE to the test sandbox so the recorded home directory is the same on every machine.
Contributor
|
@JesperMorelli 2 tests are failing in CI. From a quick glance it looks like there is a need to filter the "User" field in the pythonmocks files. Can you check? |
The mocks were recorded on Windows, where slave tasks get no User. On Linux and macOS they do, which made Batch2Tests and PollSlaveCrash fail there. Drop the User line, and the end of the line before it, which differs as a result.
Contributor
|
@JesperMorelli merged these too now. Many thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.